#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/9/16 2:04
# @Author: 张涛
# @Email: xxx@gmail.com
# @File：sjxq_opt_page.py

"""
商机详情页面
"""

from selenium.webdriver.common.by import By
from pages.base_page import BasePage

class BusiOptPage(BasePage):

    xqysc_locator = (By.XPATH,'/html/body/div[5]/div/div[2]/div[1]/div[1]/div/a[2]') #定位删除
    ztxx_locator = (By.XPATH,'/html/body/div[5]/div/div[2]/div[1]/div[2]/table[1]/tbody/tr[6]/td[4]/span') #定位商机状态信息

    def xqysc_element(self):
        '''点击删除按钮'''
        self.driver.find_element(*self.xqysc_locator).click()
        self.driver.switch_to.alert.accept()  # 提示弹框选择确定

    def ztxx_element(self):
        ztxx = self.driver.find_element(*self.ztxx_locator).text
        return ztxx